{extend name="base" /} {block name="js"}
<script src="__JS__/custommenu/methods.js"></script>
<script src="__JS__/custommenu/main.js"></script>

{/block} {block name="body"}

<div class="layui-body">
    <!-- <div id="loadOn"></div> -->
    <div style="padding: 30px 30px 30px 30px;" class="mdui-theme-primary-Grey mdui-theme-accent-Grey">
        <div id="menuList">
            <div class="menu" v-for="(item,index) in menuList">
                <div class="menuLeft">
                    <div class="firstMenu">
                        <span>一级菜单：</span>
                        <br>
                        <input @focus="focusValue(index,null)" type="text" v-model="item.name">
                    </div>
                    <span>二级菜单：</span>
                    <br>
                    <div class='sendMenu' v-for="(chirdItem,chirdIndex) in item.chirden">
                        <input @focus="focusValue(index,chirdIndex)" type='text' v-model="chirdItem.name">
                        <span class='delete' @click="deleteThisMenu(index,chirdIndex)">删除</span>
                    </div>
                </div>
                <div class="menuRight" v-if="item.menuRight.type==''">
                    
                    <textarea name="" id="" cols="30" rows="10" v-model="item.menuRight.chirdenId!=null?menuList[1].chirden[2].name:menuList[index].name" onpropertychange="this.style.posHeight=this.scrollHeight"></textarea>  
                </div>
                <div class="menuRight" v-else-if="item.menuRight.type=='view'">
                        
                    <textarea v-model="item.menuRight.chirdenId!=null?menuList[index].chirden[item.menuRight.chirdenId].url:menuList[index].url"  name="" id="" cols="30" rows="10" onpropertychange="this.style.posHeight=this.scrollHeight"></textarea>  
                </div>
                <div class="menuRight" v-else-if="item.menuRight.type=='click'">
                       
                    <textarea name="" id="" cols="30" rows="10" v-model="item.menuRight.chirdenId!=null?menuList[index].chirden[item.menuRight.chirdenId].name:menuList[index].name"onpropertychange="this.style.posHeight=this.scrollHeight"></textarea>  
                </div>

                <div class="clearfix"></div>
                <div class="menuBottom">
                    <span @click="clickAddMenu(index)" class="addSendMenu">+添加二级菜单</span>
                    <span class="reply">回复内容：<span class="blue" v-for="(funcType,typeIndex) in typeList" @click="chooseType(funcType,index)">{{funcType.name}}&emsp;</span></span>
                </div>
                <div class="clearfix"></div>
                
            </div>
            
        </div>



    </div>
</div>

{/block}